package com.tensquare.gateway.client;

import com.tensquare.entity.Result;
import com.tensquare.gateway.client.impl.UserClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Primary
@FeignClient(value = "tensquare-user",fallback = UserClientImpl.class)
public interface UserClient {

    @RequestMapping(value = "/per/{id}/check_permissions",method = RequestMethod.POST)
    public Result getPermission(@PathVariable("id") String id,@RequestParam(value = "url") String url);
}
